<!--
 * @name: 商家推荐
 * @version: 1.1.1
 * @Author: 刘大可
 * @Date: 2022-07-19 12:14:53
 * @LastEditors: 刘大可
 * @LastEditTime: 2023-11-08 16:34:52
-->
<template>
    <view class="store_box margin-lr padding margin-top">
        <view class="tit row">
            商家推荐
            <view class="all" @click="goStore('/gc_school/pages/canteen/canteen')">查看更多
                <text class="cuIcon-right"></text>
            </view>
        </view>
        <view class="store_list row">
            <block v-for="(item,index) in schoolInfo.store" :key="index">
                <view class="store_info" v-if="index<3"
                  
                    
                      @click="goStoreInfoSS( '/gc_school/pages/foold/foold?id=' + item.business_id,item.load_type)"
                    
                    >
                    <image class="main_img" :src="item.business_image" mode="scaleToFill" />
                    <view class="name">{{ item.business_name }}</view> | 
                    <view class="song">起送￥{{ item.starting_fee }}</view>
                </view>

            </block>
        </view>
    </view>
</template>

<script>
var app = getApp();
export default {
    data() {
        return {
            sys:{},
           
            authData:{}
        }
    },
    props: {
        // 即将弃用
        schoolInfo: {
            type: [Object, Array, String],
            default() {
                return {};
            }
        },
    },
    created() {

        // if (uni.getStorageSync('token')) {
        //     this.getAuth()
        // }
    },
    methods: {
        goStore(e) {
            try {
                uni.setStorageSync('module_id', this.schoolInfo.default_store_module.id)
            } catch (error) {

            }
            this.go(e)
        }
    }
}
</script>
<style lang="scss">
    @import "./main.scss";
</style>